/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const merchantRouter = [
  {
    path: '/merchant',
    component: Layout,
    redirect: 'merchant',
    name: 'Merchant',
    meta: {
      title: 'merchant.management',
      icon: 'el-icon-user-solid'
    },
    hidden: true,
    children: [
      {
        path: 'list',
        component: () => import('@/views/merchant/index'),
        name: 'MerchantList',
        meta: { title: 'merchant.list', icon: 'el-icon-user-solid' }
      },
      {
        path: 'edit/:id(\\d+)',
        component: () => import('@/views/merchant/edit'),
        name: 'MerchantEdit',
        meta: { title: 'merchant.edit', noCache: true, activeMenu: '/merchant/list' },
        hidden: true
      }
    ]
  },
  {
    path: '/profile',
    component: Layout,
    redirect: '/profile/index',
    children: [
      {
        path: 'index',
        component: () => import('@/views/profile/index'),
        name: 'MerchantProfile',
        meta: { title: 'merchant.profile', icon: 'user', noCache: true }
      }
    ]
  }
]

export default merchantRouter
